home *** CD-ROM | disk | FTP | other *** search
/ Georgia Wildfire Prevention / Georgia Wildfire Prevention.iso / mac / media / dirs / BackUp / CampFire.dir / 00024_Script_animation objs < prev    next >
Text File  |  2002-10-14  |  1KB  |  64 lines

  1. property spritenum,mysprite,mymem,myid,flasht,cycle,orect
  2.  
  3. on new me
  4.   mysprite=sprite(spritenum)
  5.   mymem=mysprite.member
  6.   myid=mymem.name
  7.   flasht=0
  8.   cycle=30
  9.   orect=mysprite.rect
  10. end
  11.  
  12. on beginsprite me
  13.   mysprite.visible=1
  14.   mysprite.loch=(-2000)
  15. end
  16.  
  17. on turnon me,id
  18.   if getpos(id,myid)>0 then
  19.     mysprite.rect=orect
  20.     updatestage
  21.   end if
  22. end
  23.  
  24. on turnoff me,id
  25.   if getpos(id,myid)>0 then
  26.     mysprite.loch=(-2000)
  27.     flasht=0
  28.     mysprite.visible=1
  29.     updatestage
  30.   end if
  31. end
  32.  
  33. on flashon me,id
  34.   if getpos(id,myid)>0 then
  35.     flasht=the ticks+cycle
  36.   end if
  37. end
  38.  
  39. on flashoff me,id
  40.   if getpos(id,myid)>0 then
  41.     mysprite.visible=1
  42.     flasht=0
  43.     updatestage
  44.   end if
  45. end
  46.  
  47. on exitframe me
  48.   if flasht<>0 then
  49.     if the ticks>=flasht then
  50.       mysprite.visible=not(mysprite.visible)
  51.       updatestage
  52.       flasht=the ticks+cycle
  53.     end if
  54.   end if
  55. end
  56.  
  57. on move me,id,p
  58.   if id=myid then
  59.     mysprite.loc=p
  60.     updatestage
  61.   end if
  62. end
  63.  
  64.